package com.weixin.paleituo.bean;

import android.os.Parcel;
import android.os.Parcelable;
import android.support.v7.widget.RecyclerView;

import java.util.List;

/**
 * 共享家样板间首页数据Bean
 *
 * @author fengzhen
 * @version v1.0, 2018/4/23
 */
public class SharedHouseBean implements Parcelable{

    /**
     * sharedurl : http://p35r91t1w.bkt.clouddn.com/Fudg0lMsDup4wfR065FyASfFvoZf
     * id : 510100
     * housesList : [{"ptList":[{"name":"轻奢风格","id":3,"surfaceUrl":"http://p35r91t1w.bkt.clouddn.com/FkRrPBBg6HqNO1EVXs0_h08GQ00f","nop":0}],"houses":"成都.中海国际林汀别墅","rout":"http://p35r91t1w.bkt.clouddn.com/Fs2USy98RAsmcrqDxW9aMOQqhwfC","id":226},{"ptList":[{"name":"极致简约","id":1,"surfaceUrl":"http://p35r91t1w.bkt.clouddn.com/Fj54l4GDLOcu9nqRGLqBQV36ZKFa","nop":1},{"name":"日式清新","id":4,"surfaceUrl":"http://p35r91t1w.bkt.clouddn.com/Fi779VnKCIs18M4UN7BrYYItJwRS","nop":0}],"houses":"成都.保利叶语","rout":"http://p35r91t1w.bkt.clouddn.com/FsjWqGDLzq-SSwK5zBpBHyVEMK2w","id":224}]
     * shortName : 成都
     */

    private String sharedurl;
    private int id;
    private String shortName;
    private List<HousesListBean> housesList;

    protected SharedHouseBean(Parcel in) {
        sharedurl = in.readString();
        id = in.readInt();
        shortName = in.readString();
        housesList = in.createTypedArrayList(HousesListBean.CREATOR);
    }

    public static final Creator<SharedHouseBean> CREATOR = new Creator<SharedHouseBean>() {
        @Override
        public SharedHouseBean createFromParcel(Parcel in) {
            return new SharedHouseBean(in);
        }

        @Override
        public SharedHouseBean[] newArray(int size) {
            return new SharedHouseBean[size];
        }
    };

    public String getSharedurl() {
        return sharedurl;
    }

    public void setSharedurl(String sharedurl) {
        this.sharedurl = sharedurl;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getShortName() {
        return shortName;
    }

    public void setShortName(String shortName) {
        this.shortName = shortName;
    }

    public List<HousesListBean> getHousesList() {
        return housesList;
    }

    public void setHousesList(List<HousesListBean> housesList) {
        this.housesList = housesList;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(sharedurl);
        dest.writeInt(id);
        dest.writeString(shortName);
        dest.writeTypedList(housesList);
    }
}
